﻿@{
    ViewBag.Title = "Preview";
}

<h1>Preview</h1>

@Html.Raw(ViewBag.PreviewText)
<input type="button" id="btnClose" name="btnClose" value="Close" onclick="CloseWithWindowOpenTrick();" />

@Scripts.Render("~/bundles/syntaxhighlighter")
@Styles.Render("~/Content/SyntaxHighlighter/css")
@section Scripts {
<script type="text/javascript">
    function CloseWithWindowOpenTrick() {
        var objWindow = window.open(location.href, "_self");
        objWindow.close();
    }
  </script>
  <script type="text/javascript">SyntaxHighlighter.all();</script>
}